package org.news.web.domain.bo;

import org.news.web.domain.Comments;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import jakarta.validation.constraints.*;

import java.util.Date;

/**
 * 评论业务对象 comments
 *
 * @author Gu Ci
 * @date 2024-04-03
 */
@Data
@AutoMapper(target = Comments.class, reverseConvertGenerate = false)
public class CommentsBo {

    /**
     * 评论ID
     */
    @NotNull(message = "评论ID不能为空", groups = { EditGroup.class })
    private Long commentId;

    /**
     * 父评论ID
     */
//    @NotNull(message = "父评论ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long parentCommentId;

    /**
     * 用户ID
     */
//    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 新闻ID
     */
    @NotNull(message = "新闻ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long newsId;

    /**
     * 评论内容
     */
    @NotBlank(message = "评论内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    private String username;



    /**
     * 记录创建时间
     */
    private Date creationTime;

    /**
     *记录更新时间
     */
    private Date updateTime;


}
